<!DOCTYPE html>
<html>
<head>
    <title>后台</title>
    <meta charset="utf-8">
    <!-- public -->
    <link rel="stylesheet" href="<?=HW_CSS?>bootstrap/css/bootstrap.min.css"> 
    <link rel="stylesheet" href="<?=HW_CSS?>base.css"> 
    <link rel="stylesheet" href="<?=HW_CSS?>font.css">
    <link rel="stylesheet" href="<?=HW_CSS?>style.css">
    <link rel="stylesheet" type="text/css" href="<?=HW_CSS?>main_content.css">
    <style type="text/css">
    	input, textarea, select { background: #f4f4f4!important; border: none!important; outline: none!important; box-shadow: none!important; }
        input[disabled], select[disabled] { background: #f4f4f4!important; cursor: default!important; }
    </style>
</head>
<body data-name="Contract">

	<form class="form-horizontal" action="" method="POST">
		<main style="margin-top: 0">
			<ul class="nav nav-tabs" role="tablist">
			    <li role="presentation" class="active"><a href="##" data-id="base_info">基本信息</a></li>
			    <li role="presentation"><a href="##" class="hide" data-id="clause_account" id="clause_account_nav">账款条款</a></li>
			    <li role="presentation"><a href="##" class="hide" data-id="end_account" id="end_account_nav">结算周期</a></li>
			    <li role="presentation"><a href="##" class="hide" data-id="before_account" id="before_account_nav">预存款条款</a></li>
			    <li role="presentation"><a href="##" class="hide" data-id="in_account" id="in_account_nav">进场条款</a></li>
			    <li role="presentation"><a href="##" data-id="aggrement_account">合同附件</a></li>
			</ul>

			<!-- Tab panes -->
			<div class="tab-content container" style="margin-left: 0">

				<!-- 基本信息内容区域 -->
			    <div class="tab-pane active" id="base_info">

		       		<!-- 签约编号、合作方式 -->
		         	<div class="form-group">
			           	<label class="col-sm-2 control-label">签约编号<span>*</span>：</label>
			           	<div class="col-sm-3">
			             	<input type="text" class="form-control" name="contract_code" required value="<?=isset($contract)?$contract['contract_code']:''?>">
			           	</div>

			           	<label class="col-sm-2 control-label">合作方式<span>*</span>：</label>
			           	<div class="col-sm-3 form_text">
			             	<?if(isset($contract)){if($contract['cooperation_type']==0){echo "固定租金";}}else{echo "";}?>
			             	<?if(isset($contract)){if($contract['cooperation_type']==1){echo "税前销售额扣点";}}else{echo "";}?>
			             	<?if(isset($contract)){if($contract['cooperation_type']==2){echo "固定租金两者取高";}}else{echo "";}?>
			           	</div>
			       	</div>

			       	<!-- 商户、项目  -->
		         	<div class="form-group">
			           	<label class="col-sm-2 control-label">商户<span>*</span>：</label>
			           	<div class="col-sm-3">
			             	<input type="text" class="form-control search_cont must" data-type="1" id="search-man" required value="<?=isset($contract)?$contract['business_name']:''?>">
			             	<input type="hidden" name="business_id" id="business_id" value="<?=isset($contract)?$contract['business_id']:''?>">
			    
			           	</div>

			           	<label class="col-sm-2 control-label">项目<span>*</span>：</label>
			           	<div class="col-sm-3 form_text">

			             	<!-- <select name="project_id" class="form-control must" id="own_project" required disabled> -->
				             	<?if(isset($project)):?>
				             	<?foreach($project as $key=>$value):?>
				             		<?if(isset($contract) && ($contract['project_id']==$value['project_id'])):?>
				             		[<?=$value['project_code']?>]<?=$value['project_name']?>
				             		<?endif;?>
				             	<?endforeach;?>
				             	<?endif;?>
				            <!-- </select> -->

			           	</div>
			       	</div>

			     	<!-- 业态、核算楼层  -->
		         	<div class="form-group">
		         		<label class="col-sm-2 control-label">铺位<span>*</span>：</label>
			           	<div class="col-sm-3">
			             	<input type="text" class="form-control search_bunk search-cont" data-type="1" value="<?=isset($contract)?$contract['bunkMsg']:''?>">
			             	<?if(isset($contract)):?>
			             	<?foreach($contract['bunk_id'] as $key=>$value):?>
			             		<input type="hidden" class="form-control" name="bunk_id[]" value="<?=$value?>">
			             	<?endforeach;?>
			             	<?endif;?>

			    
			           	</div>

			           	<label class="col-sm-2 control-label">业态<span>*</span>：</label>
			           	<div class="col-sm-3">
			             	<input type="text" class="form-control search_cont must" data-type="2" id="search-format" required value="<?=isset($contract)?$contract['formatMsg']:''?>">
			             	<input type="hidden" name="format_id" id="format_id" value="<?=isset($contract)?$contract['format_id']:''?>">
			    
			           	</div>

			       	</div>


			       	<!-- 铺位建筑面积、铺位使用面积 -->
		         	<div class="form-group hide">
			           	<label class="col-sm-2 control-label">铺位建筑面积<span>*</span>：</label>
			           	<div class="col-sm-3">
			             	<input type="number" min="0" class="form-control" name="bunk_size" value="<?=isset($contract)?$contract['bunk_size']:'0'?>">
			           	</div>

			           	<label class="col-sm-2 control-label">铺位使用面积<span>*</span>：</label>
			           	<div class="col-sm-3">
			             	<input type="number" min="0" class="form-control" name="use_size" value="<?=isset($contract)?$contract['use_size']:'0'?>">
			           	</div>
			       	</div>

			     	<!-- 铺位计租面积、铺位公摊面积 -->
		         	<div class="form-group">
			           	<label class="col-sm-2 control-label">铺位计租面积<span>*</span>：</label>
			           	<div class="col-sm-3">
			             	<input type="number" min="0" class="form-control must" name="plan_rent_size" required value="<?=isset($contract)?$contract['plan_rent_size']:''?>">
			           	</div>

			           	<label class="col-sm-2 control-label">核算楼层<span>*</span>：</label>
			           	<div class="col-sm-3 form_text">
			             	
				             	<?if(isset($floor)):?>
				             	<?foreach($floor as $key=>$value):?>
				             		 <?if(isset($contract) && ($contract['floor_id']==$value['floor_id'])):?>
				             		 [<?=$value['floor_code']?>]<?=$value['floor_name']?>
				             		 <?endif;?>
				             	<?endforeach;?>
				             	<?endif;?>
				            
			           	</div>
			       	</div>

			   		<!-- 公摊率、 核算楼层 -->
		         	<div class="form-group hide">
			           	<label class="col-sm-2 control-label">公摊率<span>*</span>：</label>
			           	<div class="col-sm-3">
			             	<input type="number" min="0" class="form-control" id="share_rate" value="<?=isset($contract)?$contract['share_percent']:'0'?>">
			           	</div>

			           	<label class="col-sm-2 control-label">铺位公摊面积<span>*</span>：</label>
			           	<div class="col-sm-3">
			             	<input type="number" min="0" class="form-control" name="share_size" value="<?=isset($contract)?$contract['share_size']:'0'?>">
			           	</div>
			       	</div>

			       	<!-- 品牌、首年优惠金额  -->
		         	<div class="form-group">
		         		<label class="col-sm-2 control-label">品牌<span>*</span>：</label>
			           	<div class="col-sm-3">
			             	<input type="text" class="form-control search-cont search_brand" required value="<?=isset($contract)?$contract['brandMsg']:''?>">
			             	<input type="hidden" name="brand_id" id="brand_id" value="<?=isset($contract)?$contract['brand_id']:''?>">
			    

			           	</div>

			           	<label class="col-sm-2 control-label">首年优惠金额<span>*</span>：</label>
			           	<div class="col-sm-3">
			             	<input type="number" min="0" class="form-control must" name="first_year_price" value="<?=isset($contract)?$contract['first_year_price']:''?>" required>

			           	</div>
			       	</div>

			     	<!-- 起始日期、结束日期 -->
		         	<div class="form-group">
			           	<label class="col-sm-2 control-label">起始日期<span>*</span>：</label>
			           	<div class="col-sm-3">
			             	<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="form-control must" name="start_time" required value="<?=isset($contract)?$contract['start_time']!=0?date('Y-m-d',strtotime($contract['start_time'])):'':''?>">

			           	</div>

			           	<label class="col-sm-2 control-label">结束日期<span>*</span>：</label>
			           	<div class="col-sm-3">
			             	<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="form-control must" name="end_time" required value="<?=isset($contract)?$contract['end_time']!=0?date('Y-m-d',strtotime($contract['end_time'])):'':''?>">
			           	</div>
			       	</div>


			      	<!-- 对方签约人、签约日期  -->
		         	<div class="form-group">
			           	<label class="col-sm-2 control-label">对方签约人<span>*</span>：</label>
			           	<div class="col-sm-3">
			             	<input type="text" class="form-control must" name="contract_name" required value="<?=isset($contract)?$contract['contract_name']:''?>">

			           	</div>

			           	<label class="col-sm-2 control-label">签约日期<span>*</span>：</label>
			           	<div class="col-sm-3">
			             	<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="form-control must" name="contract_time" required value="<?=isset($contract)?$contract['contract_time']!=0?date('Y-m-d',strtotime($contract['contract_time'])):'':''?>">
			           	</div>
			       	</div>


			       	<!-- 对方签约人、签约日期  -->
		         	<div class="form-group">

			           	<label class="col-sm-2 control-label">业务员<span>*</span>：</label>
			           	<div class="col-sm-3">
			             	<input type="text" class="form-control must" value="<?=isset($contract)?$contract['operator_name']:$_SESSION['admin_info']['name']?>" required>

			           	</div>
			       	</div>

			   		<!-- 说明 -->
		         	<div class="form-group">
		         		<label class="col-sm-2 control-label">说明：</label>
			           	<div class="col-sm-8">
			             	<textarea class="form-control" name="note" rows="3"><?=isset($contract)?$contract['note']:''?></textarea>
			           	</div>

			       	</div>

			       	<!-- 变更记录 -->
				    <div class="panel-group">
					  	<div class="panel panel-default">
					    	<div class="panel-heading">
						      	<h4 class="panel-title">
						        	<a role="button" data-toggle="collapse" href="#collapseSeven">
						          		变更记录
						        	</a>
						      	</h4>
					    	</div>
						    <div id="collapseSeven" class="panel-collapse collapse in">
						       <div class="panel-body">
						       	<?if($contract_id != 0):?>
						       		<a class="new_iframe" href="<?=base_url().'Log/Log/seeLogList/contract/'.$contract_id?>">查看变更记录</a>
						       	<?endif;?>		         	
						        </div>
						    </div>
						</div>
					</div>
			    </div>

			    <!-- 账款条款 -->
			    <div class="tab-pane" id="clause_account">
			    <?if(isset($contract) && isset($contract['clause'])):?>
			   	<?foreach($contract['clause'] as $key=>$value):?>
					<div class="bordered clause_account_item">
						<div class="opt-del-icon">×</div>
			       		
			       		<input type="hidden" name="clause_clausetype_<?=($key+1)?>" value="<?=$value['clausetype']?>">
			       		
			       		<!-- 账款名称 、选中科目-->
			         	<div class="form-group">
				           	<label class="col-sm-2 control-label">账款名称<span>*</span>：</label>
				           	<div class="col-sm-3">
				             	<input type="text" class="form-control must" name="clause_name_<?=($key+1)?>" required value="<?=$value['name']?>">
				           	</div>

				           	<label for="project_name" class="col-sm-2 control-label">选择科目<span>*</span>：</label>
				           	<div class="col-sm-3">
				             	<input type="text" class="form-control search-cont select_subject search_subject" data-type="0" data-num="<?=($key+1)?>" name="select_subject_<?=($key+1)?>" required value="<?=$value['subjectMsg']?>">
				             	<input type="hidden" name="clause_subject_<?=($key+1)?>" value="<?=$value['subject']?>">
				    

				           	</div>
				       	</div>


				     	<!-- 账款类型  -->
			         	<div class="form-group">
				           	<label for="project_name" class="col-sm-2 control-label">账款类型<span>*</span>：</label>
				           	<div class="col-sm-3 form_text use_way">
				             	<?if($value['subject_use_way']==1){echo '冲扣提成';}elseif($value['subject_use_way']==2){echo '租金';}elseif($value['subject_use_way']==3){echo '销售提成';}elseif($value['subject_use_way']==4){echo '固定费用';}elseif($value['subject_use_way']==5){echo '销售返额';}elseif($value['subject_use_way']==6){echo '临时费用';}elseif($value['subject_use_way']==7){echo '预存款';}else{echo '保证金';}?>
				           	</div>

				           	<label for="project_total_name" class="col-sm-2 control-label">收付方向：</label>
				           	<div class="col-sm-3">
				             	<input type="text" class="form-control pay_tword_<?=($key+1)?>" value="<?=$value['getpay']==0?'收':'付'?>">
				             	<input type="hidden" name="clause_getpay_<?=($key+1)?>" value="<?=$value['getpay']?>">
				           	</div>
				       	</div>


				     	<!-- 开具发票、税收 -->
			         	<div class="form-group">
				           	<label for="project_name" class="col-sm-2 control-label">开具发票：</label>
				           	<!-- <div class="col-sm-3">
				             	<input type="checkbox" name="_<?=($key+1)?>">
				           	</div> -->

				           	<div class="col-sm-3 checkbox">
						      	<label>
						        	<input type="checkbox" name="clause_invoice_<?=($key+1)?>" value="1" <?if($value['invoice']==1){echo "checked";}?>>
						      	</label>
						    </div>

				           	<label for="project_name" class="col-sm-2 control-label">税收：</label>
				           	<div class="col-sm-3">
				             	<select class="form-control tax" name="clause_tax_<?=($key+1)?>">
				             		<option value="0" <?if($value['tax']==0){echo "selected";}?>>价外税5%</option>
				             		<option value="1" <?if($value['tax']==1){echo "selected";}?>>价外税6%</option>
                                	<option value="2" <?if($value['tax']==2){echo "selected";}?>>价外税0%</option>
                                	<option value="3" <?if($value['tax']==3){echo "selected";}?>>价外税11%</option>
                                	<option value="4" <?if($value['tax']==4){echo "selected";}?>>价外税13%</option>
                               	 	<option value="5" <?if($value['tax']==5){echo "selected";}?>>价内税17%</option>
                                	<option value="6" <?if($value['tax']==6){echo "selected";}?>>价内税5%</option>
                                	<option value="7" <?if($value['tax']==7){echo "selected";}?>>价内税6%</option>
                                	<option value="8" <?if($value['tax']==8){echo "selected";}?>>价内税11%</option>
                                	<option value="9" <?if($value['tax']==9){echo "selected";}?>>价内税13%</option>
				             	</select>
				           	</div>
				       	</div>


				       	<div class="little_title">结算周期</div>
			       	
			       		<!-- 名称、出账日类型 -->
			         	<div class="form-group">
				           	<label class="col-sm-2 control-label">名称<span>*</span>：</label>
				           	<div class="col-sm-3">
				             	<input type="text" class="form-control must" required name="clause_cyclename_<?=($key+1)?>" value="<?=$value['cyclename']?>">
				           	</div>

				           	<label class="col-sm-2 control-label">出账日类型：</label>
				           	<div class="col-sm-3">
				             	<select class="form-control" name="clause_out_accounts_<?=($key+1)?>">
				             		<option value="0" <?if($value['out_accounts']==0){echo "selected";}?>>固定日</option>
				             	</select>
				           	</div>
				       	</div>

				       	<!-- 周期类型、周期月数  -->
			         	<div class="form-group">
				           	<label for="project_name" class="col-sm-2 control-label">周期类型：</label>
				           	<div class="col-sm-3">
				             	<select class="form-control" name="clause_type_<?=($key+1)?>">
				             		<option value="0" <?if($value['type']==0){echo "selected";}?>>自然月</option>
				             		<option value="1" <?if($value['type']==1){echo "selected";}?>>合同月</option>
				             	</select>
				           	</div>

				           	<label for="project_total_name" class="col-sm-2 control-label">周期月数<span>*</span>：</label>
				           	<div class="col-sm-3">
				             	<input type="number" min="0" class="form-control" name="clause_month_<?=($key+1)?>" required digist min="1" max="12" value="<?=$value['month']?>">
				           	</div>
				       	</div>

				       	<!-- <div class="row">
				       		<label class="col-sm-2 control-label">最后缴款日期</label>
				       	</div><hr> -->

				       	<!-- 起算日类型  -->
			         	<div class="form-group">
				           	<label for="project_name" class="col-sm-2 control-label">起算日：</label>
				           	<div class="col-sm-3">
				           		<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="form-control" name="clause_start_type_<?=($key+1)?>" value="<?=$value['start_type']!=0?date('Y-m-d',strtotime($value['start_type'])):''?>">
				           	</div>

				           	<!-- <label for="project_name" class="col-sm-2 control-label">起算日<span>*</span>：</label>
				           	<div class="col-sm-3 clearFixed">
				             	<div class="col-sm-6">
					             	<input type="number" min="0" class="form-control must" name="clause_start_month_<?=($key+1)?>" required digist min="0" max="12" value="<?=$value['start_month']?>">
					           	</div>
					           	<div class="col-sm-6">
					             	<input type="number" min="0" class="form-control must" name="clause_start_days_<?=($key+1)?>" required digist min="0" max="31" value="<?=$value['start_days']?>">
					           	</div>
				           	</div> -->
				       	</div>


				       	<!-- 日固定金额  -->
			         	<div class="form-group hide">
				           	<label for="project_name" class="col-sm-2 control-label">日固定金额<span>*</span>：</label>
				           	<div class="radio form-radio">
						      	<label>
						        	<input type="radio" class="must" name="clause_day_type_<?=($key+1)?>" value="0" required <?if($value['day_type']==0){echo "checked";}?>> 按日计算
						      	</label>
						    </div>
						   
				           	<div class="radio form-radio"">
						      	<label>
						        	<input type="radio" class="must" name="clause_day_type_<?=($key+1)?>"  value="1" required <?if($value['day_type']==1){echo "checked";}?>> 按年计算
						      	</label>
						    </div>
				       	</div>


				       <div class="form-group">
				         	<label class="col-sm-2 control-label">账款新增：</label>

				           	<div class="col-sm-10">
				       			<table class="table table-bordered">
									<thead>
									  	<tr>
									  		<th class="col-4">行号</th>
									  		<th class="col-10">起始日期</th>
									  		<th class="col-10">截止日期</th>
									  		<!-- if (clausetype == '1') way = '面积单价';
												if (clausetype == '2') way = '月面积单价';
												if (clausetype == '3') way = '日金额';
												if (clausetype == '4') way = '时段总金额';
												if (clausetype == '5') way = '税前销售额扣点（%）';
												if (clausetype == '6') way = '税前销售额扣点（%）'; -->
									  		<th class="col-10"><?if($value['clausetype']==1){echo '面积单价';}elseif($value['clausetype']==2){echo '月面积单价';}elseif($value['clausetype']==3){echo '日金额';}elseif($value['clausetype']==4){echo '时段总金额';}else{echo '税前销售额扣点（%）';}?></th>
									  		<th class="col-5 <?if($value['clausetype']!=6){echo 'hide';}?>">固定租金</th>
									  		<th> </th>				
									  	</tr>
									</thead>

									<tbody class="clause_tr_tem">
									<?if(is_array($value['new_clause'])):?>
									<?foreach($value['new_clause'] as $k=>$v):?>
										<tr>
											<td><?=($k+1)?></td>
											<td><input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" name="clause_new_start_time_<?=($key+1)?>_<?=($k+1)?>" value="<?=$v[0]!=0?date('Y-m-d',strtotime($v[0])):''?>"></td>
											<td><input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" name="clause_new_end_time_<?=($key+1)?>_<?=($k+1)?>" value="<?=$v[1]!=0?date('Y-m-d',strtotime($v[1])):''?>"></td>
											<td><input type="number" min="0" min="0" name="clause_new_unit_price_<?=($key+1)?>_<?=($k+1)?>" value="<?=$v[2]?>"></td>

											<td class="<?if($value['clausetype']!=6){echo 'hide';}?>"><input type="number" min="0" name="clause_new_rent_price_<?=($key+1)?>_<?=($k+1)?>" value="<?=$v[3]?>"></td>

											<td> 
											</td>
										</tr>
									<?endforeach;?>
									<?endif;?>
									</tbody>
								</table>
				       		</div>
				       		
				       	</div>

				       	<!-- 说明 -->
			         	<div class="form-group">
			         		<label class="col-sm-2 control-label">说明：</label>
				           	<div class="col-sm-8">
				             	<textarea class="form-control" name="clause_note_<?=($key+1)?>" rows="3"><?=$value['note']?></textarea>
				           	</div>

				       	</div>
				    </div>
				<?endforeach;?>
				<?endif;?>
			    </div>

			    <!-- 结算周期 -->
			    <div class="tab-pane" id="end_account">
			    <?if(isset($contract) && isset($contract['cycle'])):?>
			    <?foreach($contract['cycle'] as $key=>$value):?>
					<div class="bordered end_cycle_item">
						<div class="opt-del-icon">×</div>
						<!-- <div class="bordered-bottom form-group">
				       		<label class="col-sm-2 control-label">结算周期：</label>
				       	</div> -->
			       	
			       		<!-- 名称、出账日类型 -->
			         	<div class="form-group">
				           	<label class="col-sm-2 control-label">名称<span>*</span>：</label>
				           	<div class="col-sm-3">
				             	<input type="text" class="form-control must" name="cycle_name_<?=($key+1)?>" required value="<?=$value['name']?>">
				           	</div>

				           	<label class="col-sm-2 control-label">出账日类型：</label>
				           	<div class="col-sm-3">
				             	<select class="form-control" name="cycle_out_accounts_<?=($key+1)?>">
				             		<option value="0" <?if($value['out_accounts']==0){echo "selected";}?>>固定日</option>
				             	</select>
				           	</div>
				       	</div>

				       	<!-- 周期类型、周期月数  -->
			         	<div class="form-group">
				           	<label for="project_name" class="col-sm-2 control-label">周期类型：</label>
				           	<div class="col-sm-3">
				             	<select class="form-control" name="cycle_type_<?=($key+1)?>">
				             		<option value="0" <?if($value['type']==0){echo "selected";}?>>自然月</option>
				             		<option value="1" <?if($value['type']==1){echo "selected";}?>>合同月</option>
				             	</select>
				           	</div>

				           	<label for="project_total_name" class="col-sm-2 control-label">周期月数<span>*</span>：</label>
				           	<div class="col-sm-3">
				             	<input type="number" min="0" class="form-control" name="cycle_month_<?=($key+1)?>" required digits min="1" max="12" value="<?=$value['month']?>">
				           	</div>
				       	</div>

				       	<!-- <div class="form-group bordered-bottom row">
				       		<label class="col-sm-2 control-label">周期类型：</label>
				       	</div> -->

				       	<!-- 起算日类型  -->
			         	<div class="form-group">
				           	<label for="project_name" class="col-sm-2 control-label">起算日：</label>
				           	<div class="col-sm-3">
		           				<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="form-control" name="cycle_start_type_<?=($key+1)?>" value="<?=$value['start_type']!=0?date('Y-m-d',strtotime($value['start_type'])):''?>">

				           	</div>

				           	<!-- <label for="project_name" class="col-sm-2 control-label">起算日<span>*</span>：</label>
				           	<div class="col-sm-3">

				           		<div class="col-sm-6 clear-padding-left">
					             	<input type="number" min="0" class="form-control must" name="cycle_start_month_<?=($key+1)?>" digist min="0" max="12" required value="<?=$value['start_month']?>">
					           	</div>

				             	<div class="col-sm-6 clear-padding-right">
					             	<input type="number" min="0" class="form-control must" name="cycle_start_days_<?=($key+1)?>" digist min="0" max="31" required value="<?=$value['start_days']?>">
					           	</div>
				           	</div> -->
				       	</div>

				       	<!-- 说明 -->
			         	<div class="form-group">
			         		<label class="col-sm-2 control-label">说明：</label>
				           	<div class="col-sm-8">
				             	<textarea class="form-control" name="cycle_note_<?=($key+1)?>" rows="3"><?=$value['note']?></textarea>
				           	</div>

				       	</div>
			       	</div>
			    <?endforeach;?>
			    <?endif;?>
			    </div>

			    <!-- 预存款条款 -->
			    <div class="tab-pane" id="before_account">
			    	<?if(isset($contract) && isset($contract['pre_deposits'])):?>
			    	<?foreach($contract['pre_deposits'] as $key=>$value):?>
					<div class="bordered">
						<div class="opt-del-icon">×</div>

			        	<!-- 名称 -->
			         	<div class="form-group">
				         	<label class="col-sm-2 control-label">名称<span>*</span>：</label>
				           	<div class="col-sm-3">
				             	<input type="text" class="form-control must" name="pre_deposits_name_1" required value="<?=$value['name']?>">
				           	</div>
			           	</div>

			         	<div class="form-group">
				         	<label class="col-sm-2 control-label">科目新增：</label>

				           	<div class="col-sm-8">
				           		<table class="table table-bordered pre_subject_table">
									<thead>
									  	<tr>
									  		<th class="col-4">行号</th>
									  		<th class="col-10">科目</th>
									  		<th class="col-4">收付方向</th>
									  		<th class="col-9">金额</th>
									  		<th></th>				
									  	</tr>
									</thead>

									<tbody>
									<?if(is_array($value['new_subject'])):?>
									<?foreach($value['new_subject'] as $k=>$v):?>
										<tr>
											<td><?=($k+1)?></td>
											<td>
												<span class="relative">
													<input type="text" class="search_subject search-cont" data-type="1" data-num="<?=($k+1)?>" value="<?=$v[3]?>">
													<input type="hidden" name="pre_deposits_new_subject_1_<?=($k+1)?>" value="<?=$v[0]?>">
			
												</span>
											</td>
											<td>
												<input type="text" class="pre_pay_tword_<?=($k+1)?>" value="<?=$v[1]==0?'收':'付'?>">
												<input type="hidden" name="pre_deposits_new_getpay_1_<?=($k+1)?>" value="<?=$v[1]?>">

											</td>
											<td><input type="number" min="0" name="pre_deposits_new_price_1_<?=($k+1)?>" value="<?=$v[2]?>"></td>
											<td> 

											</td>
										</tr>
									<?endforeach;?>
									<?endif;?>
									</tbody>
								</table>
				           	</div>
				        </div>

				        <!-- 说明 -->
			         	<div class="form-group">
			         		<label class="col-sm-2 control-label">说明：</label>
				           	<div class="col-sm-8">
				             	<textarea class="form-control" name="pre_deposits_note_1" rows="3"><?=$value['note']?></textarea>
				           	</div>

				       	</div>
				    </div>
				    <?endforeach;?>
				    <?endif;?>
			    </div>

			    <!-- 进款条款 -->
			    <div class="tab-pane" id="in_account">

			    	<?if(isset($contract) && isset($contract['enter'])):?>
			    	<?foreach($contract['enter'] as $key=>$value):?>
				  	<div class="bordered">
						<div class="opt-del-icon">×</div>
			        	
			        	<!-- 交付日期、进场日期 -->
			         	<div class="form-group">
				         	<label class="col-sm-2 control-label">交付日期：</label>
				           	<div class="col-sm-3">
				             	<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="form-control" name="enter_handover_time_1" value="<?=$value['handover_time']!=0?date('Y-m-d',strtotime($value['handover_time'])):''?>">
				           	</div>

				           	<label class="col-sm-2 control-label">进场日期：</label>
				           	<div class="col-sm-3">
				             	<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="form-control" name="enter_time_1" value="<?=$value['time']!=0?date('Y-m-d',strtotime($value['time'])):''?>">
				           	</div>
			           	</div>


			           	<!-- 装修开始日期、装修期 -->
			         	<div class="form-group">
				         	<label class="col-sm-2 control-label">装修开始日期：</label>
				           	<div class="col-sm-3">
				             	<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="form-control" name="enter_decorate_time_1" value="<?=$value['decorate_time']!=0?date('Y-m-d',strtotime($value['decorate_time'])):''?>">
				           	</div>

				           	<label class="col-sm-2 control-label">装修期：</label>
				           	<div class="col-sm-3">
				             	<input type="number" min="0" class="form-control" name="enter_decorate_days_1" value="<?=$value['decorate_days']?>">
				           	</div>
			           	</div>

			           	<!-- 开业日期、计租日起 -->
			         	<div class="form-group">
				         	<label class="col-sm-2 control-label">开业日期：</label>
				           	<div class="col-sm-3">
				             	<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="form-control" name="enter_open_time_1" value="<?=$value['open_time']!=0?date('Y-m-d',strtotime($value['open_time'])):''?>">
				           	</div>

				           	<label class="col-sm-2 control-label">计租日期：</label>
				           	<div class="col-sm-3">
				             	<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="form-control" name="enter_plan_rent_time_1" value="<?=$value['plan_rent_time']!=0?date('Y-m-d',strtotime($value['plan_rent_time'])):''?>">
				           	</div>
			           	</div>

			           	<!-- 说明 -->
			         	<div class="form-group">
			         		<label class="col-sm-2 control-label">说明：</label>
				           	<div class="col-sm-8">
				             	<textarea class="form-control" name="enter_note_1" rows="3"><?=$value['note']?></textarea>
				           	</div>

				       	</div>

			        </div>
			        <?endforeach;?>
			        <?endif;?>
			    </div>

			    <!-- 合同附件 -->
			    <div class="tab-pane" id="aggrement_account" style="padding: 0 30px">

			    	<div class="form-group">
			    		<!-- 选择附件 -->
			    		<!-- <span class="color-blue " id="upload-file">
			    			+附件上传
			    		</span>	 -->
			    	</div>

			    	<div class="form-group">

			    		<!-- 附件列表 -->
			    		<div id="file-container">

			    			<?if(isset($contract) && isset($contract['attachmentList']) && is_array($contract['attachmentList'])):?>
                            <?foreach($contract['attachmentList']as $key => $value):?>
                                <div class="file-item">
                                    <img src="<?=HW_IMG?><?= $value['type_img'] ?>" class="icon">
                                    <span class="fileName"><?= $value['file_name'] ?></span>
                                    <input type="hidden" name="attachment[]" value="<?=$value['id']?>">
                                    <?if($value['type'] == 'png' || $value['type'] == 'jpg' || $value['type'] == 'jpeg' || $value['type'] == 'webp' || $value['type'] == 'gif'):?>
                                   	<a data-toggle="modal" data-target="#imgModal" data-img="<?=$value['url']?>" class="color-blue preview">预览</a>
                                   	<?endif;?>
                                    <a class="opt" href="<?=$value['url']?>">下载</a> 
                                </div>
                                <div class="file-item">
                                </div>
                           	<?endforeach;?>
                           	<?endif;?>
			    		</div>

			    	</div>

			    	<!-- <div class="form-group">
                        <label for="" class="control-label col-sm-2">添加附件</label>
                        <div class="col-sm-3">
                            <div class="add_file add_img1">添加附件</div>
                            <input type="file" name="" id="" style="display: none">
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="file" class="col-sm-2  control-label">附件列表</label>
                        <div class="col-sm-3 " id="fileContent">

                            <?php if (isset($contract) && isset($contract['attachmentList']) && is_array($contract['attachmentList'])):
                                foreach ($contract['attachmentList']as $key => $value) { ?>
                                    <div class="file-item">
                                        <img src="<?= $value['type_img'] ?>" class="icon">
                                        <span class="fileName"><?= $value['file_name'] ?></span>
                                        <input type="hidden" name="fileId[]" value="<?= $value['id'] ?>">
                                        <a href="<?= $value['url'] ?>">下载</a>
                                        <a href="#" class="del">删除</a>
                                    </div>
                                    <div class="file-item">
                                    </div>
                                <?php } endif; ?>

                        </div>
                    </div> -->
			    </div>

			</div>

		</main>
	</form>

	<!-- 附件上传form表单 -->
	<form id="upload-form" class="hide">
		<input type="file" name="file" id="file-select">
	</form>

	<div class="hide">
		
		<!-- 科目新增模版 -->
		<table>
			<tbody class="table-item—tem">
				<tr>
					<td>{{num}}</td>
					<td>
						<input type="text" class="search_subject search-cont" data-type="1">
						<input type="hidden" name="pre_deposits_new_subject_1_{{num}\
					</td>
					<td><input type="text" name="pre_deposits_new_getway_1_{{num}}"></td>
					<td><input type="number" min="0" name="pre_deposits_new_price_1_{{num}}"></td>
					<td>
						<!-- <span class="opt opt-add">新增</span>
						<span class="opt opt-del">删除</span> -->

					</td>
				</tr>
			</tbody>
		</table>


		<!-- 结算周期模版 -->
		<div id="end_cycle_tem">

			<div class="bordered end_cycle_item">
				<div class="opt-del-icon">×</div>
				<!-- <div class="bordered-bottom form-group">
		       		<label class="col-sm-2 control-label">结算周期：</label>
		       	</div> -->
	       	
	       		<!-- 名称、出账日类型 -->
	         	<div class="form-group">
		           	<label class="col-sm-2 control-label">名称<span>*</span>：</label>
		           	<div class="col-sm-3">
		             	<input type="text" class="form-control must" name="cycle_name_{{num}}" required value="">
		           	</div>

		           	<label class="col-sm-2 control-label">出账日类型：</label>
		           	<div class="col-sm-3">
		             	<select class="form-control" name="cycle_out_accounts_{{num}}">
		             		<option value="0">固定日</option>
		             	</select>
		           	</div>
		       	</div>

		       	<!-- 周期类型、周期月数  -->
	         	<div class="form-group">
		           	<label for="project_name" class="col-sm-2 control-label">周期类型：</label>
		           	<div class="col-sm-3">
		             	<select class="form-control" name="cycle_type_{{num}}">
		             		<option value="0">自然月</option>
		             		<option value="1">合同月</option>
		             	</select>
		           	</div>

		           	<label for="project_total_name" class="col-sm-2 control-label">周期月数<span>*</span>：</label>
		           	<div class="col-sm-3">
		             	<input type="number" min="0" class="form-control" name="cycle_month_{{num}}" required digits min="1" max="12" value="">
		           	</div>
		       	</div>

		       	<!-- <div class="form-group bordered-bottom row">
		       		<label class="col-sm-2 control-label">周期类型：</label>
		       	</div> -->

		       	<!-- 起算日类型  -->
	         	<div class="form-group">
		           	<label for="project_name" class="col-sm-2 control-label">起算日：</label>
		           	<div class="col-sm-3">
		           		<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="form-control" name="cycle_start_type_{{num}}" value="">
		
		           	</div>

		           	<!-- <label for="project_name" class="col-sm-2 control-label">起算日<span>*</span>：</label>
		           	<div class="col-sm-3">

		           		<div class="col-sm-6 clear-padding-left">
			             	<input type="number" min="0" class="form-control must" name="cycle_start_month_{{num}}" digist min="0" max="12" required value="">
			           	</div>

		             	<div class="col-sm-6 clear-padding-right">
			             	<input type="number" min="0" class="form-control must" name="cycle_start_days_{{num}}" digist min="0" max="31" required value="">
			           	</div>
		           	</div> -->
		       	</div>

		       	<!-- 说明 -->
	         	<div class="form-group">
	         		<label class="col-sm-2 control-label">说明：</label>
		           	<div class="col-sm-8">
		             	<textarea class="form-control" name="cycle_note_{{num}}" rows="3"></textarea>
		           	</div>

		       	</div>
	       	</div>

        </div>


        <!-- 账款条款模版 -->
        <div id="clause_account_tem">

        	<div class="bordered clause_account_item">
				<div class="opt-del-icon">×</div>
	       		
	       		<input type="hidden" name="clause_clausetype_{{num}}" value="{{clausetype}}">

	       		<!-- 账款名称 、选中科目-->
	         	<div class="form-group">
		           	<label class="col-sm-2 control-label">账款名称<span>*</span>：</label>
		           	<div class="col-sm-3">
		             	<input type="text" class="form-control must" name="clause_name_{{num}}" required value="{{text}}">
		           	</div>

		           	<label for="project_name" class="col-sm-2 control-label">选择科目<span>*</span>：</label>
		           	<div class="col-sm-3">
		             	<input type="text" class="form-control select_subject search-cont search_subject" data-type="0" data-num="{{num}}" name="select_subject_{{num}}" required>
		             	<input type="hidden" name="clause_subject_{{num}}">
		    

		           	</div>
		       	</div>


		     	<!-- 账款类型  -->
	         	<div class="form-group">
		           	<label for="project_name" class="col-sm-2 control-label">账款类型<span>*</span>：</label>
		           	<div class="col-sm-3 form_text use_way">
		             	租金
		           	</div>

		           	<label for="project_total_name" class="col-sm-2 control-label">收付方向：</label>
		           	<div class="col-sm-3">
		             	<input type="text" class="form-control pay_tword_{{num}}">
		             	<input type="hidden" name="clause_getpay_{{num}}">
		           	</div>
		       	</div>


		     	<!-- 开具发票、税收 -->
	         	<div class="form-group">
		           	<label for="project_name" class="col-sm-2 control-label">开具发票：</label>
		           	<!-- <div class="col-sm-3">
		             	<input type="checkbox" name="_{{num}}">
		           	</div> -->

		           	<div class="col-sm-3 checkbox">
				      	<label>
				        	<input type="checkbox" name="clause_invoice_{{num}}" value="1">
				      	</label>
				    </div>

		           	<label for="project_name" class="col-sm-2 control-label">税收：</label>
		           	<div class="col-sm-3">
		             	<select class="form-control tax" name="clause_tax_{{num}}">
		             		<option value="0">价外税5%</option>
				            <option value="1">价外税6%</option>
                            <option value="2">价外税0%</option>
                            <option value="3">价外税11%</option>
                           	<option value="4">价外税13%</option>
                            <option value="5">价内税17%</option>
                            <option value="6">价内税5%</option>
                            <option value="7">价内税6%</option>
                            <option value="8">价内税11%</option>
                            <option value="9">价内税13%</option>
		             	</select>
		           	</div>
		       	</div>


		       	<div class="little_title">结算周期</div>
	       	
	       		<!-- 名称、出账日类型 -->
	         	<div class="form-group">
		           	<label class="col-sm-2 control-label">名称<span>*</span>：</label>
		           	<div class="col-sm-3">
		             	<input type="text" class="form-control must" required name="clause_cyclename_{{num}}" value="">
		           	</div>

		           	<label class="col-sm-2 control-label">出账日类型：</label>
		           	<div class="col-sm-3">
		             	<select class="form-control" name="clause_out_accounts_{{num}}">
		             		<option value="0">固定日</option>
		             	</select>
		           	</div>
		       	</div>

		       	<!-- 周期类型、周期月数  -->
	         	<div class="form-group">
		           	<label for="project_name" class="col-sm-2 control-label">周期类型：</label>
		           	<div class="col-sm-3">
		             	<select class="form-control" name="clause_type_{{num}}">
		             		<option value="0">自然月</option>
		             		<option value="1">合同月</option>
		             	</select>
		           	</div>

		           	<label for="project_total_name" class="col-sm-2 control-label">周期月数<span>*</span>：</label>
		           	<div class="col-sm-3">
		             	<input type="number" min="0" class="form-control" name="clause_month_{{num}}" required digist min="1" max="12" value="">
		           	</div>
		       	</div>

		       	<!-- <div class="row">
		       		<label class="col-sm-2 control-label">最后缴款日期</label>
		       	</div><hr> -->

		       	<!-- 起算日类型  -->
	         	<div class="form-group">
		           	<label for="project_name" class="col-sm-2 control-label">起算日：</label>
		           	<div class="col-sm-3">
		           		<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="form-control" name="clause_start_type_{{num}}" value="">

		             	<!-- <select class="form-control must" name="clause_start_type_{{num}}" required>
		             		<option value="0">账单出账日</option>
		             	</select> -->
		           	</div>

		           	<!-- <label for="project_name" class="col-sm-2 control-label">起算日<span>*</span>：</label>
		           	<div class="col-sm-3 clearFixed">
		             	<div class="col-sm-6">
			             	<input type="number" min="0" class="form-control must" name="clause_start_month_{{num}}" required digist min="0" max="12" value="">
			           	</div>
			           	<div class="col-sm-6">
			             	<input type="number" min="0" class="form-control must" name="clause_start_days_{{num}}" required digist min="0" max="31" value="">
			           	</div>
		           	</div> -->
		       	</div>


		       	<!-- 日固定金额  -->
	         	<div class="form-group hide">
		           	<label for="project_name" class="col-sm-2 control-label">日固定金额<span>*</span>：</label>
		           	<div class="radio form-radio">
				      	<label>
				        	<input type="radio" class="must" name="clause_day_type_{{num}}" value="0" required checked> 按日计算
				      	</label>
				    </div>
				   
		           	<div class="radio form-radio"">
				      	<label>
				        	<input type="radio" class="must" name="clause_day_type_{{num}}"  value="1" required> 按年计算
				      	</label>
				    </div>
		       	</div>


		       <div class="form-group">
		         	<label class="col-sm-2 control-label">账款新增：</label>

		           	<div class="col-sm-10">
		       			<table class="table table-bordered">
							<thead>
							  	<tr>
							  		<th class="col-4">行号</th>
							  		<th class="col-10">起始日期</th>
							  		<th class="col-10">截止日期</th>
							  		<th class="col-10">{{price_way}}</th>
							  		<!--固定租金-->
							  		<th class="col-5 {{hide}}">固定租金</th>
							  		<th> </th>				
							  	</tr>
							</thead>

							<tbody class="clause_tr_tem">
								<tr>
									<td>{{tr_num}}</td>
									<td><input required type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" name="clause_new_start_time_{{num}}_{{tr_num}}"></td>
									<td><input required type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" name="clause_new_end_time_{{num}}_{{tr_num}}"></td>
									<td><input required type="number" min="0" min="0" name="clause_new_unit_price_{{num}}_{{tr_num}}"></td>
									<td class="{{hide}}"><input type="number" min="0" name="clause_new_rent_price_{{num}}_{{tr_num}}" value="0"></td>
									<td> 
									</td>
								</tr>
							</tbody>
						</table>
		       		</div>
		       		
		       	</div>

		       	<!-- 说明 -->
	         	<div class="form-group">
	         		<label class="col-sm-2 control-label">说明：</label>
		           	<div class="col-sm-8">
		             	<textarea class="form-control" name="clause_note_{{num}}" rows="3"></textarea>
		           	</div>

		       	</div>
		    </div>

        </div>


        <!-- 进场条款模版 -->
        <div id="in_account_tem">
			<div class="bordered">
				<div class="opt-del-icon">×</div>
	        	
	        	<!-- 交付日期、进场日期 -->
	         	<div class="form-group">
		         	<label class="col-sm-2 control-label">交付日期：</label>
		           	<div class="col-sm-3">
		             	<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="form-control" name="enter_handover_time_1" value="">
		           	</div>

		           	<label class="col-sm-2 control-label">进场日期：</label>
		           	<div class="col-sm-3">
		             	<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="form-control" name="enter_time_1" value="">
		           	</div>
	           	</div>


	           	<!-- 装修开始日期、装修期 -->
	         	<div class="form-group">
		         	<label class="col-sm-2 control-label">装修开始日期：</label>
		           	<div class="col-sm-3">
		             	<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="form-control" name="enter_decorate_time_1" value="">
		           	</div>

		           	<label class="col-sm-2 control-label">装修期：</label>
		           	<div class="col-sm-3">
		             	<input type="number" min="0" class="form-control" name="enter_decorate_days_1" value="">
		           	</div>
	           	</div>

	           	<!-- 开业日期、计租日起 -->
	         	<div class="form-group">
		         	<label class="col-sm-2 control-label">开业日期：</label>
		           	<div class="col-sm-3">
		             	<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="form-control" name="enter_open_time_1" value="">
		           	</div>

		           	<label class="col-sm-2 control-label">计租日期：</label>
		           	<div class="col-sm-3">
		             	<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="form-control" name="enter_plan_rent_time_1" value="">
		           	</div>
	           	</div>

	           	<!-- 说明 -->
	         	<div class="form-group">
	         		<label class="col-sm-2 control-label">说明：</label>
		           	<div class="col-sm-8">
		             	<textarea class="form-control" name="enter_note_1" rows="3"></textarea>
		           	</div>

		       	</div>

	        </div>
        </div>

        <!-- 预存款条款模版 -->
        <div id="before_account_tem">
        	
        	<div class="bordered">
				<div class="opt-del-icon">×</div>

	        	<!-- 名称 -->
	         	<div class="form-group">
		         	<label class="col-sm-2 control-label">名称<span>*</span>：</label>
		           	<div class="col-sm-3">
		             	<input type="text" class="form-control must" name="pre_deposits_name_1" required value="">
		           	</div>
	           	</div>

	         	<div class="form-group">
		         	<label class="col-sm-2 control-label">科目新增：</label>

		           	<div class="col-sm-10">
		           		<table class="table table-bordered pre_subject_table">
							<thead>
							  	<tr>
							  		<th class="col-4">行号</th>
							  		<th class="col-10">科目</th>
							  		<th class="col-4">收付方向</th>
							  		<th class="col-9">金额</th>
							  		<th> </th>				
							  	</tr>
							</thead>

							<tbody>
								<tr>
									<td>1</td>
									<td>
										<span class="relative">
											<input type="text" class="search_subject" data-type="1" data-num="1">
											<input type="hidden" name="pre_deposits_new_subject_1_1">
										</span>
									</td>
									<td>
										<input type="text" class="pre_pay_tword_1">
										<input type="hidden" name="pre_deposits_new_getpay_1_1" >
									</td>
									<td><input type="number" min="0" name="pre_deposits_new_price_1_1"></td>
									<td> 
									</td>
								</tr>
							</tbody>
						</table>
		           	</div>
		        </div>

		        <!-- 说明 -->
	         	<div class="form-group">
	         		<label class="col-sm-2 control-label">说明：</label>
		           	<div class="col-sm-8">
		             	<textarea class="form-control" name="pre_deposits_note_1" rows="3"></textarea>
		           	</div>

		       	</div>
		    </div>

        </div>
       
	</div>




	<!-- 搜索科目模态框 -->
	<div class="modal fade" id="subjectModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
		    <div class="modal-content">
			 	<div class="modal-header">
			        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			        <h4 class="modal-title" id="myModalLabel">科目搜索</h4>
			  	</div>
			 	<div class="modal-body">
			 		<div class="row">
						<div class="col-sm-6" style="padding-left: 15px">
						    <div class="input-group">
						      	<input type="text" class="form-control" placeholder="">
						      	<span class="input-group-btn">
						       	 	<button class="btn btn-default search-btn" type="button">搜索</button>
						      	</span>
						    </div><!-- /input-group -->
						</div>
					</div>
					<div class="table-container">
				        <table class="table table-bordered" id="business_type_table">
				        	<thead>
				        		<tr>
				        			<th class="col-2">选择</th>
				        			<th class="col-5">科目代码</th>
				        			<th class="col-10">科目名称</th>
				        			<th></th>
				        		</tr>
				        	</thead>

				        	<tbody id="subjectTbody">
				        		
				        	</tbody>
				        </table>
				    </div>
			  	</div>
			 	<div class="modal-footer">
			        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
			        <button type="button" class="btn btn-primary select_subject_btn">确定</button>
			 	</div>
		    </div>
		</div>
	</div>


	<!-- 商户搜索模态框 -->
	<div class="modal fade" id="businessModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
		    <div class="modal-content">
			 	<div class="modal-header">
			        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			        <h4 class="modal-title" id="myModalLabel">商户搜索</h4>
			 	</div>
				<div class="modal-body">
					<div class="row">
						<div class="col-sm-6" style="padding-left: 15px">
						    <div class="input-group">
						      	<input type="text" class="form-control" placeholder="">
						      	<span class="input-group-btn">
						       	 	<button class="btn btn-default search-btn" type="button">搜索</button>
						      	</span>
						    </div><!-- /input-group -->
						</div>
					</div>
					<div class="table-container">
				       	<table class="table table-bordered">
				       	
				       		<thead>
				       			<tr>
				       				<th class="col-2">选择</th>
				       				<th class="col-10">商户名称</th>
				       				<th class="col-8">简称</th>
				       				<th class="col-5">外文名称</th>
				       				<th class="col-5">外文简称</th>
				       				<th></th>
				       			</tr>
				       		</thead>

				       		<tbody id="business-tbody">
				       			
				       		</tbody>
				       	</table>
			       	</div>
			 	</div>

			 	<div class="modal-footer">
			        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
			        <button type="button" class="btn btn-primary" id="business-confirm">确定</button>
			  	</div>
		    </div>
		</div>
	</div>

	<!-- 业态搜索模态框 -->
	<div class="modal fade" id="formatModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
		    <div class="modal-content">
			 	<div class="modal-header">
			        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			        <h4 class="modal-title" id="myModalLabel">业态搜索</h4>
			 	</div>
				<div class="modal-body">
					<div class="row">
						<div class="col-sm-6" style="padding-left: 15px">
						    <div class="input-group">
						      	<input type="text" class="form-control" placeholder="">
						      	<span class="input-group-btn">
						       	 	<button class="btn btn-default search-btn" type="button">搜索</button>
						      	</span>
						    </div><!-- /input-group -->
						</div>
					</div>
					<div class="table-container">
				       	<table class="table table-bordered">
				       		<thead>
				       			<tr>
				       				<th class="col-2">选择</th>
				       				<th class="col-5">业态代码</th>
				       				<th class="col-10">业态名称</th>
				       				<th></th>
				       			</tr>
				       		</thead>

				       		<tbody id="format-tbody"></tbody>
				       	</table>
				    </div>
			 	</div>
			 	<div class="modal-footer">
			        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
			        <button type="button" class="btn btn-primary" id="format-confirm">确定</button>
			  	</div>
		    </div>
		</div>
	</div>

	<!-- 铺位搜索模态框 -->
	<div class="modal fade" id="bunkModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
		    <div class="modal-content">
			 	<div class="modal-header">
			        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			        <h4 class="modal-title" id="myModalLabel">铺位搜索</h4>
			 	</div>
				<div class="modal-body">
					<div class="row">
						<div class="col-sm-6" style="padding-left: 15px">
						    <div class="input-group">
						      	<input type="text" class="form-control" placeholder="">
						      	<span class="input-group-btn">
						       	 	<button class="btn btn-default search-btn" type="button">搜索</button>
						      	</span>
						    </div><!-- /input-group -->
						</div>
					</div>
					<div class="table-container">
				       	<table class="table table-bordered" id="bunk_type_table">
				       		<thead>
				       			<tr>
				       				<th class="col-2">选择</th>
				       				<th class="col-5">铺位代码</th>
				       				<th class="col-10">铺位名称</th>
				       				<th></th>
				       			</tr>
				       		</thead>

				       		<!-- <tbody id="operation_type_tbody">
				       			<tr>
				       				<td><input type="radio" name="operation_type_radio"></td>
				       				<td></td>
				       				<td></td>
				       			</tr>
				       		</tbody> -->
				       	</table>
				    </div>
			 	</div>
			 	<div class="modal-footer">
			        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
			        <button type="button" class="btn btn-primary bunk_type_btn">确定</button>
			  	</div>
		    </div>
		</div>
	</div>

	<!-- 品牌搜索模态框 -->
	<div class="modal fade" id="brandModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
		    <div class="modal-content">
			 	<div class="modal-header">
			        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			        <h4 class="modal-title" id="myModalLabel">品牌搜索</h4>
			 	</div>
				<div class="modal-body">

					<div class="row">
						<div class="col-sm-6" style="padding-left: 15px">
						    <div class="input-group">
						      	<input type="text" class="form-control" placeholder="">
						      	<span class="input-group-btn">
						       	 	<button class="btn btn-default search-btn" type="button">搜索</button>
						      	</span>
						    </div><!-- /input-group -->
						</div>
					</div>
					<div class="table-container">
				       	<table class="table table-bordered" id="brand_type_table">
				       	
				       		<thead>
				       			<tr>
				       				<th class="col-2">选择</th>
				       				<!-- <th>业态代码</th> -->
				       				<th class="col-10">品牌名称</th>
				       				<th class="col-5">英文名称</th>
				       				<th></th>
				       			</tr>
				       		</thead>
				       	</table>
				    </div>
			 	</div>

			 	<div class="modal-footer">
			        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
			        <button type="button" class="btn btn-primary brand_type_btn">确定</button>
			  	</div>
		    </div>
		</div>
	</div>

	<!-- Modal -->
	<div class="modal fade" id="imgModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
		    <div class="modal-content">
			  	<div class="modal-header">
			        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			        <h4 class="modal-title" id="myModalLabel">图片预览</h4>
			 	</div>
			  	<div class="modal-body">
			        <img class="preview-img" src="" alt="预览图片">
			  	</div>
			  	<div class="modal-footer">
			        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			  	</div>
		    </div>
		</div>
	</div>

	<!-- 图片预览 -->
	<div class="modal fade" id="uploadModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
		    <div class="modal-content">
			  	<div class="modal-header">
			        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			        <h4 class="modal-title" id="myModalLabel">图片预览</h4>
			 	</div><form  id="upload">
			  	<div class="modal-body">
			  		
			        	<input type="file" name="file">
			        
			  	</div>
			  	<div class="modal-footer">
			        <button type="button" class="btn btn-default" id="modal-file" >上传</button>

			        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			  	</div></form>
		    </div>
		</div>
	</div>


	<div class="loading">
		<!-- <div class="tip"> -->
			<img class="tip" src="<?=HW_IMG?>loading.gif">
		<!-- </div> -->
	</div>
<!-- <script src="https://cdn.bootcss.com/bluebird/3.4.7/bluebird.min.js"></script> -->
	<script src="<?=HW_STA?>lib/require.js" data-main="<?=HW_BUS?>contract/seeContract"></script>
</body>
</html>